using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestTools.UnitTesting;

using ShopPowerTemplate.IoC;
using ShopPowerTemplate.Entities;
using ShopPowerTemplate.Services.Tests.Properties;

namespace ShopPowerTemplate.Services.Tests
{
    public partial class CategoryServiceUtil
    {
	
		static internal ICategoryService CreateCategoryService()
        {
            ICategoryService target = IoCFactory.Resolve<ICategoryService>();
            return target;
        }
				#region Category Test
 
        

		public static Category CreateCategory()
        {
            Category result = GetCategory();
            ICategoryService service = CreateCategoryService();
			service.Add(result);

			result = service.Find(result.Id);
            return result;
        }
		
		public static Category CreateCategoryFull()
        {
            Category result = GetCategoryFull();
            ICategoryService service = CreateCategoryService();
			service.Add(result);

			result = service.Find(result.Id);
            return result;
        }
				
        public static Category GetCategory()
        {
            Category result = new Category();
			
            result.Name = Guid.NewGuid().ToString();

            result.Description = Guid.NewGuid().ToString();
			result.Image =  Resources.test;
 
            return result;
            
        }
		
        public static Category GetCategoryFull()
        {
            Category result = GetCategory();
             
            return result;
            
        }
		
		#endregion Category Test
	

	}
}
